package com.jdrx.sw.sewage.beans.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "WorkOrderPO", description = "维保工单")
@Data
public class WorkOrderPO implements Serializable {
    private static final long serialVersionUID = -1206960462117924923L;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "id主键", required = true)
    private Long id;

    @ApiModelProperty(value = "领用设备id", required = true)
    private Long devId;

    @ApiModelProperty(value = "派单时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;

    @ApiModelProperty(value = "维保时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date maintenanceTime;

    @ApiModelProperty(value = "维保人id", required = true)
    private Long maintenanceById;

    @ApiModelProperty(value = "维保人", required = true)
    private String maintenanceBy;

    @ApiModelProperty(value = "派单人id", required = true)
    private Long singlePersonId;

    @ApiModelProperty(value = "派单人", required = true)
    private String singlePerson;

    @ApiModelProperty(value = "类型（1 - 保养 2 -维修）", required = true)
    private Integer type;

    @ApiModelProperty(value = "保养/维修方式（保养/维修方式（紧固、清洁、标定、清洗、润滑、其他 /小修、中修、大修、其他 ）多个逗号分隔 ）英文逗号分隔", required = true)
    private String maintenanceType;

    @ApiModelProperty(value = "设备照片（多个用英文逗号隔开）", required = true)
    private String attach;

    @ApiModelProperty(value = "维保意见/维修意见", required = true)
    private String opinion;

    @ApiModelProperty(value = "故障描述(维修才有？)", required = true)
    private String faultDesc;

    @ApiModelProperty(value = "保养描述/维修描述", required = true)
    private String maintenanceDesc;

    @ApiModelProperty(value = "预计费用", required = true)
    private Double estimatedCost;

    @ApiModelProperty(value = "实际费用", required = true)
    private Double actualCost;

    @ApiModelProperty(value = "状态(0-待办 1-完成)", required = true)
    private Integer status;

    @ApiModelProperty(value = "完成时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.util.Date completeTime;
}